package com.example.testproj.design.state;

import com.example.testproj.design.state.workstate.ForenoonState;
import com.example.testproj.design.state.workstate.WorkState;

/**
 * @des:
 * @author: 芮勤
 * @date: 2019/6/17 13:32
 * @see {@link }
 */
public class Work {
    private int hour;
    private WorkState state;
    private boolean taskFinied=false;

    public Work() {
        state=new ForenoonState();
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    public WorkState getState() {
        return state;
    }

    public void setState(WorkState state) {
        this.state = state;
    }

    public boolean isTaskFinied() {
        return taskFinied;
    }

    public void setTaskFinied(boolean taskFinied) {
        this.taskFinied = taskFinied;
    }

    public void writeProgram(){
        state.writeProgram(this);
    }
}
